<?php
session_start();
if (!$_SESSION["autentificado"]) {
    header('Location: index.php');
}
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
  <title>Registro</title>
  <meta name="HandheldFriendly" content="True" />
  <meta name="MobileOptimized" content="320" />
  <meta content="minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" name="viewport" />
  <meta name="description" content="">
  <script type="text/javascript" src="js/ajax_vercita.js"></script>
  <!--<link  href="http://fonts.googleapis.com/css?family=Oswald:regular" rel="stylesheet" type="text/css" > -->
  <script src="js/libs/jquery-1.7.1.min.js"></script>
  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="fonts/raphaelicons.css">
  <link rel="stylesheet" href="css/main2.css">
  <link rel="stylesheet" type="text/css" href="css/inicio.css">
  <script>

  function recuperar(){
    document.getElementById('select1').load
  }
  </script>
</head>

<!--[if lt IE 7]> <body class="ie6 oldies"> <![endif]-->
<!--[if IE 7]>    <body class="ie7 oldies"> <![endif]-->
<!--[if IE 8]>    <body class="ie8 oldies"> <![endif]-->
<!--[if gt IE 8]><!-->
<body><!--<![endif]-->

<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
  <header class="clearfix">
      <div class="container">       
        <nav class="clearfix">
          <ul role="navigation">
            <li>
              <a href="index.php"><span class="icon"></span>Inicio</a>
            </li>
            <li>
              <a href="inicio.php"><span class="icon"></span>Ciudades</a>
            </li>
            <li>
              <a href="registrarcita.php"><span class="icon"></span>Tu Reunion</a>
            </li>
            <li>
              <a href="salir.php"><span class="icon"></span>Salir</a>
            </li>
          </ul>
        </nav>
      </div>
  </header>
   <section role="banner">
       <article role="main" class="clearfix">
           <div class="post">
            <figure>
            <img src="images/logo.png" alt="logo">
          </figure>       
           </div>
       </article>
   </section> <!-- // banner ends -->
   <section class="container">
       <div class="columns">

           <article>
              <section id="contenedor_contacto">
                <label for="region">Región:</label>
                    <?php
                     include_once("php/localidades.php");
                    ?>
                <label for="ciudad">Ciudad:</label>
                   <select id='listaprovincias' name='select2' onFocus='recuperar()'>
                      <option value="11">Iquique</option>
                      <option value="14">Tamarugal</option>
                    </select>
              </section>
              <!--aca van las citas -->

           </article>
       </div> <!-- //.columns -->
       <section id="contenedorcitas">
                <h1>seleccione la región y la ciudad para filtrar</h1>
              </section> 
   </section>
  <footer role="contentinfo">
          <p>2012 Inacap Temuco. All rights reserved.</p>
          <p>Taller de Desarrollo Web</p>
          <ul class="social-icons">
          <li><a href="http://www.facebook.com/" class="icon flip">^</a></li>
          <li><a href="" class="icon">T</a></li>
          <li><a href="http://www.twitter.com/" class="icon">^</a></li>
        </ul>
  </footer>
  
<script type="text/javascript">
$(document).ready(function(){
  mostrarCitas(11);
});

$('#select1').change(function(){
    var selectedOption = $(this).find('option:selected');
    var selectedLabel = selectedOption.text();
    var selectedValue = selectedOption.val();
    mostrarProvincias(selectedValue);

  });
$('#listaprovincias').change(function(){
    var selectedOption = $(this).find('option:selected');
    var selectedLabel = selectedOption.text();
    var id_provincias = selectedOption.val();
    mostrarCitas(id_provincias);
  });
</script>
</body>
</html>